<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="referrer" content="never">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>site</title>
  <style>
    html {
      height: 100%;
      display: grid;
      place-content: center stretch;
      align-items: center;
    }
    main {
      display: grid;
      grid-template-columns: repeat(auto-fill, 200px);
      text-align: center;
      gap: 20px 20px;
      place-items: start center;
      justify-content: center;
      align-content: center;
    }
    main > a {
      position: relative;
      justify-self: stretch;
      align-self: stretch;
      height: 80px;
      padding: 15px;
      border-radius: 3px;
      box-shadow: 0 0 10px 5px #00000017;
      overflow: hidden;
      cursor: pointer;
      display: grid;
      place-items: center center;
      text-decoration: none;
    }
    main > a::after {
      content: attr(data-des);
      position: absolute;
      top: 100%;
      left: 0;
      width: 100%;
      height: 30px;
      line-height: 30px;
      background-color: rgba(0, 0, 0, .3);
      color: #fff;
      font-weight: 700;
      will-change: transform;
      transition: transform .2s ease-out;
    }
    main > a:hover::after {
      transform: translateY(-100%);
    }
    main > a > img {
      height: 100%;
      width: auto;
      max-width: 100%;
    }
    main > a:empty::before {
      content: attr(data-des);
      font-size: 40px;
      color: #999;
      font-weight: bold;
    }
  </style>
</head>
<body>
  <main></main>
  <script>
    const sites = [
      { des: '掘金', url: 'https://juejin.im', logo: 'https://b-gold-cdn.xitu.io/v3/static/img/logo.a7995ad.svg' },
      { des: 'InfoQ', url: 'https://juejin.im', logo: 'https://static001.geekbang.org/static/business/img/logo-infoq.0c39f06d.svg' },
      { des: '语雀', url: 'https://www.yuque.com/', logo: 'https://gw.alipayobjects.com/zos/rmsportal/XuVpGqBFxXplzvLjJBZB.svg' },
      { des: '知乎', url: 'https://www.zhihu.com/', logo: 'https://public-cdn.mokahr.com/a6c18d04-4e5c-4d0c-957a-b2daa2388e59.png?x-oss-process=image/resize,m_lfit,w_200,h_48' },
      { des: '阮一峰', url: 'https://www.ruanyifeng.com/', logo: '' },
      { des: '张鑫旭', url: 'https://www.zhangxinxu.com/', logo: 'https://cdn.zhangxinxu.com/wordpress/wp-content/themes/default/images/index_logo.gif' },
      { des: '凹凸实验室', url: 'https://aotu.io/', logo: 'https://aotu.io/img/o2logo.png' },
      { des: 'JDC', url: 'https://jdc.jd.com/', logo: 'https://jdc.jd.com/wp-content/themes/jdc/img/logo.png' },
      { des: 'IMWeb团队', url: 'https://imweb.io/topic/tab/all', logo: 'https://imweb.github.io/img/logo.png' },
      { des: '人人FED', url: 'https://www.rrfed.com/', logo: '' },
      { des: 'Div.IO', url: 'Div.IO', logo: '' },
      { des: '卓帆网', url: 'https://www.chenzhuofan.top/', logo: '' },
      { des: '开发者头条', url: 'https://toutiao.io/posts/hot/7', logo: '' },
      { des: '阿里中间件', url: 'http://jm.taobao.org/', logo: '' },
      { des: '有赞', url: 'https://tech.youzan.com/', logo: 'https://tech.youzan.com/content/images/2017/10/logo.png' },
      { des: '滴滴云博客', url: 'https://blog.didiyun.com/index.php/category/development/', logo: 'https://dicloud.didistatic.com/static/dicloudpub/www/img/logo.69cc432da4.png' },
      { des: '酷壳', url: 'https://coolshell.cn/featured', logo: 'https://coolshell.cn/coolshell_logo.png' },
      { des: '美团TECH', url: 'https://tech.meituan.com/', logo: '' },
      { des: '奇舞周刊', url: 'https://weekly.75team.com/', logo: 'https://p1.ssl.qhimg.com/t019a998a1b366e334e.png' },
      { des: 'AlloyTeam', url: 'http://www.alloyteam.com/page/0/', logo: 'http://www.alloyteam.com/wp-content/themes/alloyteam/images/logo.png' },
      { des: 'SegmentFault', url: 'https://segmentfault.com/channel/frontend', logo: 'https://cdn.segmentfault.com/v-5e7dd7fe/global/img/logo-b.svg' },
      { des: '政采云', url: 'https://www.zoo.team/', logo: 'https://www.zoo.team/images/site/site-logo.png' },
      { des: '虫部落导航', url: 'http://code.giffox.com/', logo: 'http://code.giffox.com/images/code-logo.svg' },
      { des: '极客导航', url: 'https://geekdocs.cn/', logo: 'https://geekdocs.cn/wp-content/uploads/2020/04/geekdocs-black.png' },
      { des: '玩美', url: 'https://playmei.com/developer.html', logo: 'https://playmei.com/images/logo.gif' },
      { des: '在线工具', url: 'https://tool.lu/', logo: 'https://qn13.tool.lu/201714/15/103319bpfNNx3ST9v8UKtO_56x56.png' },
      { des: 'Vue 社区', url: 'https://forum.vuejs.org/', logo: 'https://forum.vuejs.org/uploads/default/original/2X/5/555257b8c5e7ecf34ce4f9b952eeaf006adfa339.png' },
    ]
    const genHtml = ({des, url, logo}) => `<a href=${url} data-des=${des}>${logo&&`<img src=${logo}>`}</a>`
    const htmlStr = sites.map(genHtml).join('')
    const container = document.querySelector('main')
    container.innerHTML = htmlStr
  </script>
</body>
</html>